package cn.exrick.xboot.modules.projectinfo.controller;

import cn.exrick.xboot.common.utils.PageUtil;
import cn.exrick.xboot.common.utils.ResultUtil;
import cn.exrick.xboot.common.vo.PageVo;
import cn.exrick.xboot.common.vo.Result;
import cn.exrick.xboot.common.vo.SearchVo;
import cn.exrick.xboot.modules.bicmktbiddinginfo.entity.RequestData;
import cn.exrick.xboot.modules.projectinfo.entity.*;
import cn.exrick.xboot.modules.projectinfo.service.IProjectInfoService;
import cn.hutool.core.util.StrUtil;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.transaction.annotation.Transactional;

import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author sdtf
 */
@Slf4j
@RestController
@DS("other")
@Api(tags = "项目信息管理接口")
@RequestMapping("/xboot/projectInfo")
@Transactional
public class ProjectInfoController {

    @Autowired
    private IProjectInfoService iProjectInfoService;

    @RequestMapping("/LikeByNames")
    @ApiOperation(value = "在建项目and项目、单位名称模糊查询")
    public Result ProjectIsInfoLikeProjectNumber(ProjectNew projectNew){
        List<ProjectNew> projectNews = iProjectInfoService.ProjectIsInfoLikeProjectNumber(projectNew);
        return ResultUtil.data(projectNews);
    }

    @RequestMapping(value = "/getByCondition", method = RequestMethod.GET)
    @ApiOperation(value = "多条件分页获取--在建项目")
    public Result<IPage<ProjectInfo>> getByCondition(ProjectInfo projectInfo, SearchVo searchVo, PageVo page) {
        QueryWrapper<ProjectInfo> qw = new QueryWrapper<>();

        // 统计日期相等匹配
        if (searchVo.getStartDate() != "" && searchVo.getEndDate() != "") {
            String startDate = searchVo.getStartDate();
            String endDate = searchVo.getEndDate();
            qw.between("zshtgsj", startDate, endDate);
        }

        //判断传来的是省内还是省外,如果传进来是一个值
        if (projectInfo.getArealist() != null && projectInfo.getArealist().length == 1) {
            if ("省内".equals(projectInfo.getArealist()[0])) {
                // area山东省内模糊搜索
                qw.like("area_code","37");
            } else {
                // area山东省外模糊搜索
                qw.notLike("area_code", "37");
            }
        } else {
            // area模糊搜素
            qw.like(StrUtil.isNotBlank(projectInfo.getAreaCode()), "area", projectInfo.getAreaCode());
        }
        // 省份编码模糊搜素
        qw.like(StrUtil.isNotBlank(projectInfo.getAreaCode()), "area_code", projectInfo.getAreaCode());
        // 项目编号模糊搜素
        qw.like(StrUtil.isNotBlank(projectInfo.getZprojcode()), "zprojcode", projectInfo.getZprojcode());
        // 项目名称模糊搜素
        qw.like(StrUtil.isNotBlank(projectInfo.getZtfxmmc0()), "ztfxmmc0", projectInfo.getZtfxmmc0());
        // 项目类型模糊搜素
        qw.like(StrUtil.isNotBlank(projectInfo.getZprojtype()), "zprojtype", projectInfo.getZprojtype());
        // 项目性质模糊搜素
        qw.like(StrUtil.isNotBlank(projectInfo.getZpnature()), "zpnature", projectInfo.getZpnature());
        // 项目状态 模糊搜素
        qw.eq( "zpstatus","00003");
        // 项目过程名称模糊搜素
        qw.like(StrUtil.isNotBlank(projectInfo.getZtfgcmc0()), "ztfgcmc0", projectInfo.getZtfgcmc0());
        // 负责部门编号模糊搜素
        qw.like(StrUtil.isNotBlank(projectInfo.getZchargorg()), "zchargorg", projectInfo.getZchargorg());
        // 计划开工日期 模糊搜素
        qw.like(StrUtil.isNotBlank(projectInfo.getZjhkgsj()), "zjhkgsj", projectInfo.getZjhkgsj());
        // 计划完工日期模糊搜素
        qw.like(StrUtil.isNotBlank(projectInfo.getZjhwgsj()), "zjhwgsj", projectInfo.getZjhwgsj());
        // 要求完成日期模糊搜素
        qw.like(StrUtil.isNotBlank(projectInfo.getZyqwcsj()), "zyqwcsj", projectInfo.getZyqwcsj());
        // 审核通过日期模糊搜素
        qw.like(StrUtil.isNotBlank(projectInfo.getZshtgsj()), "zshtgsj", projectInfo.getZshtgsj());
        // 业务关闭日 模糊搜素
        qw.isNull("ztfywgbr");
        // 财务关闭日模糊搜素
        qw.like(StrUtil.isNotBlank(projectInfo.getZtfcwgbr()), "ztfcwgbr", projectInfo.getZtfcwgbr());
        IPage<ProjectInfo> data = iProjectInfoService.page(PageUtil.initMpPage(page), qw);
//        获取项目金额
        List<ProjectInfo> list =  iProjectInfoService.getProjectAmount();
        List<ProjectInfo> records = data.getRecords();
        for (ProjectInfo record : records) {
            for (ProjectInfo info : list) {
                if (info.getZprojcode().equals(record.getZprojcode())){
                    record.setProjectAmount(info.getProjectAmount());
                }
            }
        }

//        获取负责部门
        List<ProjectInfo> list1 =  iProjectInfoService.getdept();
        for (ProjectInfo record : records) {
            for (ProjectInfo info : list1) {
                if (info.getZprojcode().equals(record.getZprojcode())){
                    record.setZchargorg(info.getZchargorg());
                }
            }
        }

        return new ResultUtil<IPage<ProjectInfo>>().setData(data);
    }

    @RequestMapping(value = "/get/{id}", method = RequestMethod.GET)
    @ApiOperation(value = "通过id获取")
    public Result<ProjectInfo> get(@PathVariable String id) {

        ProjectInfo projectInfo = iProjectInfoService.getById(id);
        return new ResultUtil<ProjectInfo>().setData(projectInfo);
    }

    @RequestMapping(value = "/getAll", method = RequestMethod.GET)
    @ApiOperation(value = "获取全部数据")
    public Result<List<ProjectInfo>> getAll() {

        List<ProjectInfo> list = iProjectInfoService.list();
        return new ResultUtil<List<ProjectInfo>>().setData(list);
    }

    @RequestMapping(value = "/getByPage", method = RequestMethod.GET)
    @ApiOperation(value = "分页获取")
    public Result<IPage<ProjectInfo>> getByPage(PageVo page) {

        IPage<ProjectInfo> data = iProjectInfoService.page(PageUtil.initMpPage(page));
        return new ResultUtil<IPage<ProjectInfo>>().setData(data);
    }

    @RequestMapping(value = "/insertOrUpdate", method = RequestMethod.POST)
    @ApiOperation(value = "编辑或更新数据")
    public Result<ProjectInfo> saveOrUpdate(ProjectInfo projectInfo) {

        if (iProjectInfoService.saveOrUpdate(projectInfo)) {
            return new ResultUtil<ProjectInfo>().setData(projectInfo);
        }
        return new ResultUtil<ProjectInfo>().setErrorMsg("操作失败");
    }

    @RequestMapping(value = "/delByIds", method = RequestMethod.POST)
    @ApiOperation(value = "批量通过id删除")
    public Result delAllByIds(@RequestParam String[] ids) {

        for (String id : ids) {
            iProjectInfoService.removeById(id);
        }
        return ResultUtil.success("批量通过id删除数据成功");
    }

    @RequestMapping(value = "/ProjectNumberAndMoneyByYear", method = RequestMethod.GET)
    @ApiOperation(value = "今年项目数量和金额")
    public Result<RequireData> ProjectNumberAndMoneyByYear() {
        RequireData requireData = iProjectInfoService.ProjectNumberAndMoneyByYear();
        return new ResultUtil<RequireData>().setData(requireData);
    }
    @RequestMapping(value = "/ProjectNumberAndMoneyByMonth", method = RequestMethod.GET)
    @ApiOperation(value = "本月项目数量和金额")
    public Result<RequireData> ProjectNumberAndMoneyByMonth() {
        RequireData requireData = iProjectInfoService.ProjectNumberAndMoneyByMonth();
        return new ResultUtil<RequireData>().setData(requireData);
    }

    @RequestMapping(value = "/SYSJ", method = RequestMethod.GET)
    @ApiOperation(value = "首页数据-收入确认和开票")
    public Result<DeptLife> SYSJ() {
        DeptLife deptLife = iProjectInfoService.SYSJ();
        return new ResultUtil<DeptLife>().setData(deptLife);
    }

    @RequestMapping(value = "/XJLRLC", method = RequestMethod.GET)
    @ApiOperation(value = "首页数据-现金流入流出")
    public Result<DeptLife> XJLRLC() {
        DeptLife deptLife = iProjectInfoService.XJLRLC();
        return new ResultUtil<DeptLife>().setData(deptLife);
    }

    @RequestMapping(value = "/ProjectLife", method = RequestMethod.GET)
    @ApiOperation(value = "项目生命周期数图表")
    public Result ProjectLife() {
        LinkedList<Object> requireData = iProjectInfoService.ProjectLife();
        return new ResultUtil<LinkedList<Object>>().setData(requireData);
    }
    @RequestMapping(value = "/ProjectType", method = RequestMethod.GET)
    @ApiOperation(value = "项目类型图表")
    public Result ProjectType() {
        LinkedList<Object> requireData = iProjectInfoService.ProjectType();
        return new ResultUtil<LinkedList<Object>>().setData(requireData);
    }
    @RequestMapping(value = "/ProjectWithOther", method = RequestMethod.GET)
    @ApiOperation(value = "协同项目图表")
    public Result ProjectWithOther() {
        LinkedList<Object> requireData = iProjectInfoService.ProjectWithOther();
        return new ResultUtil<LinkedList<Object>>().setData(requireData);
    }
    @RequestMapping(value = "/ProjectStatus", method = RequestMethod.GET)
    @ApiOperation(value = "项目状态图表")
    public Result ProjectStatus() {
        LinkedList<Object> requireData = iProjectInfoService.ProjectStatus();
        return new ResultUtil<LinkedList<Object>>().setData(requireData);
    }

    @RequestMapping(value = "/ProjectNewByYear", method = RequestMethod.GET)
    @ApiOperation(value = "新建重大项目")
    public Result ProjectNewByYear() {
        List<RequireData> requireData = iProjectInfoService.ProjectNewByYear();
        return new ResultUtil<List<RequireData>>().setData(requireData);
    }

    @RequestMapping(value = "/ProjectIsByYear", method = RequestMethod.GET)
    @ApiOperation(value = "在投重大项目")
    public Result ProjectIsByYear() {
        List<RequireData> requireData = iProjectInfoService.ProjectIsByYear();
        return new ResultUtil<List<RequireData>>().setData(requireData);
    }

    @RequestMapping(value = "/DeptInfoByYear", method = RequestMethod.GET)
    @ApiOperation(value = "单位基本情况表本年")
    public Result DeptInfo() {
        List<DeptBasicInfo> requireData = iProjectInfoService.DeptInfo();
        return new ResultUtil<List<DeptBasicInfo>>().setData(requireData);
    }
    @RequestMapping(value = "/DeptInfoByMonth", method = RequestMethod.GET)
    @ApiOperation(value = "单位基本情况表本月")
    public Result DeptInfoByMonth() {
        List<DeptBasicInfo> requireData = iProjectInfoService.DeptInfoByMonth();
        return new ResultUtil<List<DeptBasicInfo>>().setData(requireData);
    }

    @RequestMapping(value = "/DeptProjectLife", method = RequestMethod.GET)
    @ApiOperation(value = "单位基本情况表(关于生命周期)")
    public Result DeptProjectLife() {
        List<DeptLife> requireData = iProjectInfoService.DeptProjectLife();
        return new ResultUtil<List<DeptLife>>().setData(requireData);
    }

    @RequestMapping(value = "/ProjectCost", method = RequestMethod.GET)
    @ApiOperation(value = "单位全年收票")
    public Result ProjectCost() {
        List<DeptLife> requireData = iProjectInfoService.ProjectCost();
        return new ResultUtil<List<DeptLife>>().setData(requireData);
    }

    @RequestMapping(value = "/ProjectCostByMonth", method = RequestMethod.GET)
    @ApiOperation(value = "单位本月收票")
    public Result ProjectCostByMonth() {
        List<DeptLife> requireData = iProjectInfoService.ProjectCostByMonth();
        return new ResultUtil<List<DeptLife>>().setData(requireData);
    }

    @RequestMapping(value = "/ProjectIncome", method = RequestMethod.GET)
    @ApiOperation(value = "单位全年开票")
    public Result ProjectIncome() {
        List<DeptLife> requireData = iProjectInfoService.ProjectIncome();
        return new ResultUtil<List<DeptLife>>().setData(requireData);
    }
    @RequestMapping(value = "/ProjectIncomeByMonth", method = RequestMethod.GET)
    @ApiOperation(value = "单位本月开票")
    public Result ProjectIncomeByMonth() {
        List<DeptLife> requireData = iProjectInfoService.ProjectIncomeByMonth();
        return new ResultUtil<List<DeptLife>>().setData(requireData);
    }

    @RequestMapping(value = "/ProjectNewInfo", method = RequestMethod.GET)
    @ApiOperation(value = "新建项目三级菜单")
    public Result ProjectNewInfo(PageVo pageVo) {
        List<ProjectNew> requireData = iProjectInfoService.ProjectNewInfo(pageVo);
        return new ResultUtil<List<ProjectNew>>().setData(requireData);
    }


    @RequestMapping(value = "/ProjectIsInfo", method = RequestMethod.GET)
    @ApiOperation(value = "在建项目三级菜单")
    public Result ProjectIsInfo(PageVo pageVo) {
        List<ProjectNew> requireData = iProjectInfoService.ProjectIsInfo(pageVo);
        return new ResultUtil<List<ProjectNew>>().setData(requireData);
    }

    @RequestMapping(value = "/NumberAndMoneyTwice", method = RequestMethod.GET)
    @ApiOperation(value = "跳转二级菜单本年")
    public Result NumberAndMoneyTwice(NumberAndMoneyTwice numberAndMoneyTwice) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.NumberAndMoneyTwice(numberAndMoneyTwice);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }

    @RequestMapping(value = "/NumberAndMoneyTwiceByMonth", method = RequestMethod.GET)
    @ApiOperation(value = "跳转二级菜单本月")
    public Result NumberAndMoneyTwiceByMonth(NumberAndMoneyTwice numberAndMoneyTwice) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.NumberAndMoneyTwiceByMonth(numberAndMoneyTwice);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }

    @RequestMapping(value = "/NumberAndMoneyTwiceClose", method = RequestMethod.GET)
    @ApiOperation(value = "跳转二级菜单本年关闭")
    public Result NumberAndMoneyTwiceClose(NumberAndMoneyTwice numberAndMoneyTwice) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.NumberAndMoneyTwiceClose(numberAndMoneyTwice);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }

    @RequestMapping(value = "/NumberAndMoneyTwiceByMonthClose", method = RequestMethod.GET)
    @ApiOperation(value = "跳转二级菜单本月关闭")
    public Result NumberAndMoneyTwiceByMonthClose(NumberAndMoneyTwice numberAndMoneyTwice) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.NumberAndMoneyTwiceByMonthClose(numberAndMoneyTwice);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }

    @RequestMapping(value = "/SPMoneyTwice", method = RequestMethod.GET)
    @ApiOperation(value = "收票跳转二级菜单")
    public Result SPMoneyTwice(PageVo pageVo) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.SPMoneyTwice(pageVo);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }
    @RequestMapping(value = "/SPMoneyTwiceByMonth", method = RequestMethod.GET)
    @ApiOperation(value = "收票跳转二级菜单本月")
    public Result SPMoneyTwiceByMonth(PageVo pageVo) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.SPMoneyTwiceByMonth(pageVo);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }
    @RequestMapping(value = "/KPMoneyTwice", method = RequestMethod.GET)
    @ApiOperation(value = "开票跳转二级菜单")
    public Result KPMoneyTwice(PageVo pageVo) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.KPMoneyTwice(pageVo);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }
    @RequestMapping(value = "/KPMoneyTwiceByMonth", method = RequestMethod.GET)
    @ApiOperation(value = "开票跳转二级菜单本月")
    public Result KPMoneyTwiceByMonth(PageVo pageVo) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.KPMoneyTwiceByMonth(pageVo);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }



    @RequestMapping(value = "/LXProjectInfoThird", method = RequestMethod.GET)
    @ApiOperation(value = "立项项目信息三级菜单")
    public Result LXProjectInfoThird(RequestData requestData,PageVo pageVo) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.LXProjectInfoThird(requestData,pageVo);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }

    @RequestMapping(value = "/GBProjectInfoThird", method = RequestMethod.GET)
    @ApiOperation(value = "关闭项目信息三级菜单")
    public Result GBProjectInfoThird(RequestData requestData,PageVo pageVo) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.GBProjectInfoThird(requestData,pageVo);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }

    @RequestMapping(value = "/ZJProjectInfoThird", method = RequestMethod.GET)
    @ApiOperation(value = "在建项目信息三级菜单")
    public Result ZJProjectInfoThird(RequestData requestData,PageVo pageVo) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.ZJProjectInfoThird(requestData,pageVo);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }

    @RequestMapping(value = "/BNProjectInfoThird", method = RequestMethod.GET)
    @ApiOperation(value = "已开工半年项目信息三级菜单")
    public Result BNProjectInfoThird(RequestData requestData,PageVo pageVo) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.BNProjectInfoThird(requestData,pageVo);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }
    @RequestMapping(value = "/BNDYNProjectInfoThird", method = RequestMethod.GET)
    @ApiOperation(value = "已开工半年到一年项目信息三级菜单")
    public Result BNDYNProjectInfoThird(RequestData requestData,PageVo pageVo) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.BNDYNProjectInfoThird(requestData,pageVo);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }@RequestMapping(value = "/YNDLNProjectInfoThird", method = RequestMethod.GET)
    @ApiOperation(value = "已开工一年到两年项目信息三级菜单")
    public Result YNDLNProjectInfoThird(RequestData requestData,PageVo pageVo) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.YNDLNProjectInfoThird(requestData,pageVo);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }
    @RequestMapping(value = "/LNDSNProjectInfoThird", method = RequestMethod.GET)
    @ApiOperation(value = "已开工两年到三年项目信息三级菜单")
    public Result LNDSNProjectInfoThird(RequestData requestData,PageVo pageVo) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.LNDSNProjectInfoThird(requestData,pageVo);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }
    @RequestMapping(value = "/SNYSProjectInfoThird", method = RequestMethod.GET)
    @ApiOperation(value = "已开工三年以上项目信息三级菜单")
    public Result SNYSProjectInfoThird(RequestData requestData,PageVo pageVo) {
        List<NumberAndMoneyTwice> requireData = iProjectInfoService.SNYSProjectInfoThird(requestData,pageVo);
        return new ResultUtil<List<NumberAndMoneyTwice>>().setData(requireData);
    }

    @RequestMapping(value = "/YSZK", method = RequestMethod.GET)
    @ApiOperation(value = "首页数据--应收账款")
    public Result YSZK() {
        AllBoardData requireData = iProjectInfoService.YSZK();
        return new ResultUtil<AllBoardData>().setData(requireData);
    }
    @RequestMapping(value = "/SYData", method = RequestMethod.GET)
    @ApiOperation(value = "首页数据--中间地图数据")
    public Result SYData() {
        List<AllBoardData> requireData = iProjectInfoService.SYData();
        return new ResultUtil<List<AllBoardData>>().setData(requireData);
    }



    /**
     * 在建大项目排行--无参
     */
    @RequestMapping(value = "/zjprojectordernull", method = RequestMethod.GET)
    @ApiOperation(value = "在建大项目排行--无参")
    public Result zjprojectordernull(PageVo page) {
        List<ProjectInfo> selectData = iProjectInfoService.zjprojectordernull(page);
        return new ResultUtil<List<ProjectInfo>>().setData(selectData);
    }
    /**
     * 在建大项目排行--有参
     */
    @RequestMapping(value = "/zjprojectorderbydate", method = RequestMethod.GET)
    @ApiOperation(value = "在建大项目排行--带参数")
    public Result zjprojectorder(PageVo page,SearchVo searchVo) {
        List<ProjectInfo> selectData = iProjectInfoService.zjprojectorder(page,searchVo);
        return new ResultUtil<List<ProjectInfo>>().setData(selectData);
    }

    /**
     * 立项大项目排行--无参
     */
    @RequestMapping(value = "/lxprojectordernull", method = RequestMethod.GET)
    @ApiOperation(value = "在建大项目排行--无参")
    public Result lxprojectordernull(PageVo page) {
        List<ProjectInfo> selectData = iProjectInfoService.lxprojectordernull(page);
        return new ResultUtil<List<ProjectInfo>>().setData(selectData);
    }
    /**
     * 立项大项目排行--有参
     */
    @RequestMapping(value = "/lxprojectorder", method = RequestMethod.GET)
    @ApiOperation(value = "在建大项目排行--带参数")
    public Result lxprojectorder(PageVo page,SearchVo searchVo) {
        List<ProjectInfo> selectData = iProjectInfoService.lxprojectorder(page,searchVo);
        return new ResultUtil<List<ProjectInfo>>().setData(selectData);
    }

    /**
     * 关闭大项目排行--无参
     */
    @RequestMapping(value = "/gbprojectordernull", method = RequestMethod.GET)
    @ApiOperation(value = "在建大项目排行--无参")
    public Result gbprojectordernull(PageVo page) {
        List<ProjectInfo> selectData = iProjectInfoService.gbprojectordernull(page);
        return new ResultUtil<List<ProjectInfo>>().setData(selectData);
    }
    /**
     * 关闭大项目排行--有参
     */
    @RequestMapping(value = "/gbprojectorder", method = RequestMethod.GET)
    @ApiOperation(value = "在建大项目排行--带参数")
    public Result gbprojectorder(PageVo page,SearchVo searchVo) {
        List<ProjectInfo> selectData = iProjectInfoService.gbprojectorder(page,searchVo);
        return new ResultUtil<List<ProjectInfo>>().setData(selectData);
    }

    /**
     * 公司不同状态下的数量和金额总数
     */
    @RequestMapping(value = "/getCompanyNumberAmount", method = RequestMethod.GET)
    @ApiOperation(value = "公司不同状态下的数量和金额总数")
    public Result getCompanyNumberAmount(String str) {
        List<CompanyNumberAmount> requireData = iProjectInfoService.getCompanyNumberAmount(str);
        return new ResultUtil<List<CompanyNumberAmount>>().setData(requireData);
    }

    /**
     * 在建项目类型分析
     */
    @RequestMapping(value = "/getProjectTypeAnalysis", method = RequestMethod.GET)
    @ApiOperation(value = "在建项目类型分析")
    public Result getProjectTypeAnalysis(String str) {
        List<ProjectTypeAnalysis> requireData = iProjectInfoService.getProjectTypeAnalysis(str);
        return new ResultUtil<List<ProjectTypeAnalysis>>().setData(requireData);
    }

}
